//testCardClasses.cpp


#include <iostream>
using namespace std;
#include "deck.h"
#include "Countedq.h"
#include "cardGameFunctions.h"

int main()
{
	Deck theDeck;

	cout << "Original deck.\n";
	theDeck.displayDeck();
	cout << endl << endl;
	cout << "Deck after shuffling.\n";
	theDeck.Shuffle();
	theDeck.displayDeck();
	cout << endl << endl;

	CountedQue<Card> hand1, hand2;
	Deal(theDeck, hand1,2);
	cout << "hand 1 has been dealt 2 cards and is as follows" << endl;
	showHand(cout, hand1);
	cout << endl;
	Deal(theDeck, hand2,3);
	cout << "Hand 2 has been dealt 3 cards and is as follows" << endl;
	showHand(cout, hand2);
	cout << "Hand 2 has been dealt 4 more cards and is as follows" << endl;
	Deal(theDeck, hand2, 4);
	showHand(cout, hand2);

	cout << "Hand 3 is the same as hand 1 and is as follows" << endl;
	CountedQue<Card> h3(hand1);
	showHand(cout, h3);

	cout << "Hand 4 is the same as hand 2 and is as follows" << endl;
	CountedQue<Card> h4 = hand2;
	showHand(cout, h4);

	Card card1, card2;
	hand1.Dequeue(card1);
	hand2.Dequeue(card2);
	
	if (card1.getValue() > card2.getValue())
	{
		cout << "The card from hand 1, the " << card1 << ", is greater than \n"
			 << "the card from hand2, the " << card2 << endl;
	}
	else if (card1.getValue() == card2.getValue())
	{
		cout << "The card from hand 1, the " << card1 << ", is equal in value to \n"
			 << "the card from hand2, the " << card2 << "." << endl;
	}
	else 
	{
		cout << "The card from hand 2, the " << card2 << ", is greater than \n"
			 << "the card from hand 1, the " << card1 << "." << endl;
	}
	cout << endl;

	cout << "Hand1 now contains these cards.\n";
	showHand(cout, hand1);
	
	system("pause");
	
   return 0;
}
